<!DOCTYPE html>
            
<HTML>
<HEAD>
<meta name="booktitle" content="Developing Applications With Objective Caml" >
 <meta charset="ISO-8859-1"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<META name="GENERATOR" content="hevea 1.05-7 of 2000-02-24">
<META NAME="Author" CONTENT="Christian.Queinnec@lip6.fr">
<LINK rel=stylesheet type="text/css" href="videoc-ocda.css">
<script language="JavaScript" src="videoc.js"><!--
//--></script>
<TITLE>
 Mixed Organisations
</TITLE>
</HEAD>
<BODY class="regularBody">
<A HREF="book-ora154.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<A HREF="book-ora156.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2> Mixed Organisations</H2>The last example of the preceding section showed the advantages that
there are in mixing the two models for the problem of the
extensibility of components. We now propose to mix parameterized
modules and late binding to benefit from the power of these two
features. The application of the functor will produce new modules
containing classes which use the type and functions of the
parameterized module. If, moreover, the signature obtained is
compatible with the signature of the parameterized module, it is then
possible to re-apply the parameterized module to the resulting module,
thus making it possible to construct new classes automatically.<BR>
<BR>
A concrete example is given in the last part of this book which is
dedicated to concurrent and/or distributed programs (page
<A HREF="book-ora194.html#sec-protocole">??</A>). We use a functor to generate a
communication protocol starting from a data type; a second functor
permits us to then deduce from this protocol a class which implements
a generic server which handles requests expressed in the protocol.
Inheritance can then be used to specialize the server into the
service that is actually required.<BR>
<BR>
<BR>
<BR>

<BR>
<BR>
<HR>
<A HREF="book-ora154.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<A HREF="book-ora156.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
